namespace oms.Shared.Services.Redis;

/// <summary>
/// Redis服务接口
/// </summary>
public interface IRedisService
{
    /// <summary>
    /// 从Redis中获取值
    /// </summary>
    /// <param name="key">键</param>
    /// <returns>值</returns>
    Task<string?> GetAsync(string key);
    
    /// <summary>
    /// 测试Redis连接
    /// </summary>
    /// <returns>是否连接成功</returns>
    Task<bool> TestConnectionAsync();

    /// <summary>
    /// 获取下一个序列值（每日过期）
    /// </summary>
    /// <param name="key">键名</param>
    /// <returns>下一个序列值</returns>
    Task<long> GetNextSequenceWithDailyExpiryAsync(string key);
}